The 'clear( )' Function can be used to remove all the elements from the Dictionary.
So, in the above code we have created a 'Dictionary' using braces '{ }' and 'Key' and 'Value' pairs.
x = {
5 : "Is a Number",
"John": "Is a Name",
"Python": "Is a Language"
}
And initialised to the variable 'x'.
FunctionDictionary1.png)
And we have used the 'clear( )' method to remove all the elements from the 'Dictionary'.
And the print statement, prints an empty 'Dictionary'.